The present application relates to sampled data systems and more particularly to techniques for tracking the sample rate of an input data stream that is asynchronous to a locally available sampling clock.
It is well-known to represent audio signals as streams of audio samples. Well-known applications include CD players, digital music synthesis, sound effects for games, etc. Sample rates are however not standardized among all types of digital audio equipment.
Consider a situation where a personal computer sound synthesis system combines locally synthesized music and input from, e.g., a CD player. The sampling rate of the locally generated audio data and the CD player input will differ. Furthermore, the CD player output will not be synchronized at all to the local clock of the personal computer sound synthesis system. Combining the sounds generated by each will require synchronization of the input sound data to the local clock and also a resampling of the input sound samples to the local clock rate.
Performing these functions is the task of a device known as an asynchronous sample rate converter. A typical asynchronous sample rate converter may be understood as primarily consisting of two components: an asynchronous sample rate tracker, and a resampler. The tracker receives the input data samples at the source data rate and provides the input data samples to the resampler in sync with the local sampling clock. The tracker also provides the resampler with an estimated ratio of the source sample rate to the local sample rate.
Typically, the tracker controls a buffer to store input samples until they are ready to be provided to the resampler. The tracker must provide the input samples to the resampler so that the buffer does not become either full or empty. It is also desirable that the tracker rapidly acquire the ratio of sampling rates. The tracker implementation should also be simple.